<template>
  <div>
    <ul>
      <li v-for="(item, index) in count" :key="index" @click="goDetail(item)">
        <div>
          第 {{ item }} 间房
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      count: 12
    }
  },
  methods: {
    goDetail(item) {
      this.$router.push({
        path: '/detail',
        query: {
          num: item
        }
      })
    }
  }
}
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
  margin: 10px 0;
  height: 60px;
  line-height: 60px;
  padding-left: 10px;
  border-bottom: 2px solid #ccc;
}
li:last-child {
  margin-bottom: 70px;
}
</style>